package com.xxxx.vao.server.utils;

import com.xxxx.vao.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @author ：xiongl
 * @date ：Created in 2021/4/22 16:48
 * @description：操作员工具类
 */
public class AdminUtils {
    /**
     * 获取当前用户
     * @return
     */
    public static Admin getCurrentAdmin() {
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
